package com.wyp168.leetcode;

public class HanoiTower {
    public static void main(String[] args) {

        move(3,'a','b','c');

    }


    public static void move(int num,char a, char b, char c) {
        //程序的边界值
        //当我们只有一个盘的时候，我们直接将该盘移动到c柱上即可
        if (num == 1) {
            System.out.println(a + "->" + c);
        } else {
            move(num -1 ,a , c, b);
            System.out.println(a + "->" + c);
            move(num-1, b, a, c);
        }
    }
}
